<HTML><HEAD><TITLE>recordz(+Key, ?Value, -DBRef)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Recorded Database</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>recordz(+Key, ?Value, -DBRef)</H1>
Records the term Value at the end of key Key in the indexed database.


<DL>
<DT><EM>Key</EM></DT>
<DD>An atom, compound term, or handle.
</DD>
<DT><EM>Value</EM></DT>
<DD>Any prolog term.
</DD>
<DT><EM>DBRef</EM></DT>
<DD>A variable.
</DD>
</DL>
<H2>Description</H2>
   Used to record any prolog term Value at the end of the indexed database
   entry associated with the key Key.  Unlike recordz/2, this predicate
   delivers a so-called database reference in DBRef which is a unique handle
   for the indexed database entry that is created.  In the case of
   compound terms, all keys of the same name and arity are treated as equal.

<P>
   If backtracking occurs through the call of recordz/3 the associated
   Value is not removed from the indexed database.

<P>

<H3>Modes and Determinism</H3><UL>
<LI>recordz(+, ?, -) is det
</UL>
<H3>Modules</H3>
This predicate is sensitive to its module context (tool predicate, see @/2).
<H3>Exceptions</H3>
<DL>
<DT><EM>(4) instantiation fault </EM>
<DD>Key is not instantiated.
<DT><EM>(5) type error </EM>
<DD>Key is neither an atom nor a compound term.
<DT><EM>(5) type error </EM>
<DD>DBRef neither a variable nor a database reference.
</DL>
<H2>Examples</H2>
<PRE>
   Success:
    [eclipse]: recordz(whiskey,jameson,Ref1),
             recordz(whiskey,bushmills,Ref2).
    Ref1 = 'DBREF'(16'50470f10)
    Ref2 = 'DBREF'(16'50470f28)
    yes.
Error:
    recordz(Key, anything, Ref).          (Error 4)
    recordz("key",anything, Ref).         (Error 5)
    recordz(key,anything, 99).            (Error 5)



</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/record/recorda-3.html">recorda / 3</A>, <A HREF="../../kernel/record/recorded-3.html">recorded / 3</A>, <A HREF="../../kernel/record/erase-1.html">erase / 1</A>, <A HREF="../../kernel/typetest/is_handle-1.html">is_handle / 1</A>, <A HREF="../../kernel/record/referenced_record-2.html">referenced_record / 2</A>
</BODY></HTML>
